/*
 * LabelElement.h
 *
 *  Created on: 2010-6-6
 *      Author: guobc
 */

#ifndef LABELELEMENT_H_
#define LABELELEMENT_H_

#include "CommonElement.h"

namespace HA {
class LabelElement: public HA::CommonElement {
public:
	LabelElement();

	/**
	 * Get the set of names handles by this element.
	 * @return The names to be matched that create elements of this type.
	 */
	inline string* getIds() const {
		return mIds;
	}

	/**
	 * Return the set of name that cause this element to finish.
	 * @return The names of following elements that stop further parse.
	 */
	inline string* getEnders() const {
		return mIds;
	}

	/**
	 * Allow creating an instance of this node.
	 * @return A new instance of this node.
	 */
	inline ASTNode* newInstance() const {
		return new LabelElement();
	}
private:
	static string mIds[];
};
}
#endif /* LABELELEMENT_H_ */
